package main

import (
	"fmt"
	"time"
)

func main() {
	//1、sleep
	time.Sleep(time.Second * 2)

	//2、Timer.C
	fmt.Println("now time 1", time.Now())
	timer := time.NewTimer(time.Second * 2)
	<-timer.C
	fmt.Println("now time 2", time.Now())

	//3、time.After
	fmt.Println("now time 3", time.Now())
	<-time.After(time.Second * 1)
	fmt.Println("now time 4", time.Now())

}
